<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会议管理</title>
</head>
<script>
var baseUrl = "<?php echo $this->baseUrl;?>";
</script>
<link href="<?php echo $this->baseUrl;?>/admincss/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/admincss/thickbox.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/thickbox.compressed.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/user.js" /></script>
<script>
function docheck(obj)
{
	var nstatus = obj.value;
	var mid = obj.name.split("_")[1];

	var url = baseUrl + "/?m=admin&c=meeta&a=status";
	$.post(url, {mid:mid, nstatus:nstatus}, function (ret){
		alert("操作成功！");
		location.reload();
	}, "json");
}


function dopub(obj)
{
	var npublic = obj.value;
	var mid = obj.name.split("_")[1];

	var url = baseUrl + "/?m=admin&c=meeta&a=public";
	$.post(url, {mid:mid, npublic:npublic}, function (ret){
		location.reload();
	}, "json");
}
</script>
<body>
<table class="tableA" width="100%" border="1">
  <tr>
    <td width="5%" nowrap="nowrap">会议编号</td>
    <td width="6%" nowrap="nowrap">会议名称</td>
    <td width="13%" nowrap="nowrap">办会人</td>
    <td width="15%" nowrap="nowrap"><?php if ($this->status == 3 || $this->status == 2){?>审核日期<?php }else{?>提交日期<?php }?></td>
    <td width="14%" nowrap="nowrap">会议状态</td>
    <td width="12%" nowrap="nowrap">操作</td>
  </tr>
<?php
foreach ($this->list as $v){
$time = $v['submittime'];
if ($this->status == 3 || $this->status == 2)
	$time = $v['checktime'];


$arr_status = array("未申请","待审核","未通过","已发布");
$status = $arr_status[$v['status']];


$url = $this->baseUrl . '/' . $v['domain'] . '?d=1';
$surl=$this->url($this->baseUrl, 'user', 'show', 'UserId='.$v['uid'] . '&height=450');

$delurl = $this->url($this->baseUrl, 'meeta', 'clist', 'mid=' . $v['mid'] . '&nowp=' . $this->nowp);

print <<<EOT
  <tr id="row_{$v['mid']}">
    <td width="5%" nowrap="nowrap">{$v['mid']}</td>
    <td width="6%" nowrap="nowrap"><a target="_blank" title="点击预览" href="$url">{$v['name']}</a></td>
    <td width="13%" nowrap="nowrap"><a href="$surl" class="thickbox">{$v['uname']}</a></td>
    <td width="15%" nowrap="nowrap">{$time}</td>
    <td width="14%" nowrap="nowrap">{$status}</td>
    <td width="14%" nowrap="nowrap"><a href="{$delurl}" onclick="javascript:return window.confirm('确认删除mid={$v['mid']}');">删除</a></td>
  </tr>
EOT;
}

$ext = "&status=" . $this->status;
$indexurl =$this->url($this->fullUrl, 'meeta', 'list', 'nowp=1' . $ext);
$nexturl = $this->url($this->fullUrl, 'meeta', 'list', 'nowp='.$this->page['next']. $ext);
$preurl = $this->url($this->fullUrl, 'meeta', 'list', 'nowp='.$this->page['previous']. $ext);
$lasturl = $this->url($this->fullUrl, 'meeta', 'list', 'nowp='.$this->page['totalpage']. $ext);
print <<<EOT
  <tr>
    <td colspan="7">共{$this->page['totalnum']}个 {$this->page['nowp']}/{$this->page ['totalpage']}
<a href="{$indexurl}">首页</a>
<a href="{$nexturl}">下一页</a>
<a href="{$preurl}">前一页</a>
<a href="{$lasturl}">末页</a></td>
  </tr>
<!--
EOT;
?>
</table>
</body>
</html>
